package edu.asu.sapa.ground.update;

import edu.asu.sapa.ground.Operator;
import edu.asu.sapa.ground.State;
import edu.asu.sapa.heuristic.PG;

public abstract class Update implements Cloneable, Comparable<Update> {
	public abstract boolean applicableBefore(State state, Context c); // means applicable at
	public abstract boolean applicableAfter(State state, Context c);
	
	public abstract boolean startBefore(State s, Context c, float time); // means starts at
	public abstract boolean startAfter(State s, Context c, float time);
	
	public abstract boolean finishBefore(State s, Context c, float time);
	public abstract boolean finishAfter(State s, Context c, float time); // means ends at
	
	public abstract boolean updateBefore(State s, Context c, float time); // i.e., start and end simultaneously
	public abstract boolean updateAfter(State s, Context c, float time); // only valid for conditions
	
	public abstract boolean analyzeStatic(float dur);
	public abstract boolean isNoOp();
	public abstract boolean isFail();
	
	public abstract void removeDependencies(Operator o);
	public abstract void setDependencies(Operator o);
	
	public abstract void relaxedStart(PG pg, State s, Context c, float time);
	public abstract void relaxedFinish(PG pg, State s, Context c, float time);
	public abstract void relaxedUpdate(PG pg, State s, Context c, float time);
	
}
